<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
<meta name="description" content="description"/>
<meta name="keywords" content="keywords"/>
<meta name="author" content="author"/>
<link rel="stylesheet" type="text/css" href="css/style.css" media="screen"/>
<!--DatePicker [INIZIO]-->
<script src="js/jquery-1.7.1.js"></script>
<script src="js/jquery.ui.core.js"></script>
<script src="js/jquery.ui.widget.js"></script>
<script src="js/jquery.ui.datepicker.js"></script>
<script src="js/jquery.ui.datepicker-it.js"></script>
<link rel="stylesheet" href="css/jquery.ui.all.css">
<link rel="stylesheet" href="css/jquery-ui-1.8.17.custom.css">
<!--Verifica Form [INIZIO]-->
<script src="js/jquery.validationEngine.js"></script>
<script src="js/jquery.validationEngine-it.js"></script>
<link rel="stylesheet" href="css/validationEngine.jquery.css">
<script>
	//<!--Verifica Form [MIDDLE]-->
	jQuery(document).ready(function(){
	// binds form submission and fields to the validation engine
	jQuery("#formID").validationEngine();
	// hook dell'errore
	$("#formID").bind("jqv.form.validating", function(event){
		$("#hookError").html("")
	})
	$("#formID").bind("jqv.form.result", function(event , errorFound){
		if(errorFound) $("#hookError").append("ATTENZIONE: assicurati di aver compilato correttamente TUTTI i campi.");
	})
	});
  //<!--Verifica Form [FINE]-->
	//<!--DatePicker [MIDDLE]-->
  $(function() {
		var dates = $( "#from, #to" ).datepicker({
			showOtherMonths: true,
			selectOtherMonths: true,
			minDate: 0,
      //maxDate: "+11M +30D"
			showButtonPanel: true,
			onSelect: function( selectedDate ) {
				var option = this.id == "from" ? "minDate" : "maxDate",
					instance = $( this ).data( "datepicker" ),
					date = $.datepicker.parseDate(
						instance.settings.dateFormat ||
						$.datepicker._defaults.dateFormat,
						selectedDate, instance.settings );
				dates.not( this ).datepicker( "option", option, date );
			}
		});
  	$( "#datepicker" ).datepicker( $.datepicker.formatDate[ "dd/mm/yy" ] );
		$( "#datepicker" ).datepicker( $.datepicker.regional[ "it" ] );
});
</script>
<!--DatePicker [FINE]-->
<!--NewsScroller [INIZIO]-->
<script src="js/news.js"></script>
<link rel="stylesheet" href="css/news.css" type="text/css" media="all" />
<!--NewsScroller [FINE]-->
<title>F &amp; WONDERVIAGGI</title>
</head>

<body>

<div class="top">
	<div class="header">
		<div class="row_top">
			<h1><span style="color: #787676;">F &amp; WONDERVIAGGI</span></h1>
		</div>
		<div class="row_bottom">
			<h1>&nbsp;</h1>
		</div>
	</div>
</div>

<div class="container">
	<div id="menunav">
		<ul>
			<li><a href="index.php">Home</a></li>
			<li><a href="chi.php">Chi siamo</a></li>
			<li><a href="servizi.php">Servizi</a></li>
			<li><a href="prenotazioni.php">Prenota</a></li>
<!--			<li><a href="dove.php">Dove siamo</a></li> -->
  		<center><table width="210" align="right"><tr><td valign="middle" align="center"><a href="http://it-it.facebook.com/people/Fwonder-Viaggi/100000925453768" target="_blank"><img src="images/facebook.png" width="32px"  border="0"/></a></td></tr></table></center>
		</ul>
		<div class="clearer"><span> </span></div>
	</div>
	<div class="main">
		<div class="content">

			<h3>Prenotazioni</h3>
      <p align="center">
	<form id="formID" class="formular" method="post" action="esito.php">
		<fieldset>
			<legend>
				RICHIESTA PREVENTIVO
			</legend>
      <table class="tabnews" width="100%" border="0" align="center" valign="top">
    	<div id="hookError" style="color:red; font-weight:bold;height:20px;"></div>
      <tr>
      <td width="350" align="left"><label><strong>Nome</strong></label></td>
      <td width="50">&nbsp;</td>
      <td align="left"><input value="" class="validate[required] text-input" type="text" name="nome" id="nome" maxlength="50" /></td>
      </tr>
      <tr>
      <td align="left"><label><strong>Cognome</strong></label></td>
      <td>&nbsp;</td>
      <td align="left"><input value="" class="validate[required] text-input" type="text" name="cognome" id="cognome" maxlength="50" /></td>
      </tr>
      <tr>
      <td align="left"><label><strong>Email</strong></label></td>
      <td>&nbsp;</td>
      <td align="left"><input value="" class="validate[required,custom[email]] text-input" type="text" name="email" id="email" maxlength="100" /></td>
      </tr>
      <tr>
      <td align="left"><label><strong>Telefono</strong></label></td>
      <td>&nbsp;</td>
      <td align="left"><input value="" class="validate[required] text-input" type="text" name="telefono" id="telefono" maxlength="10" /></td>
      </tr>
      <tr>
      <td align="left"><label><strong>Destinazione</strong></label></td>
      <td>&nbsp;</td>
      <td align="left">
      <select class="validate[required]" name="destinazione" id="destinazione">
      <option value="">Destinazione</option>
          <?php
          try
              {
              $dsn = "sqlite:dbdir/database.sqlite";
              $username = "";
              $pass = "";
              $PDO = New PDO($dsn, $username, $pass);
              }
              catch (PDOException $e) {
              die('Connessione fallita: ' . $e->getMessage());
              }
              // settiamo il gestore degli errori
              $PDO->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
              $sql_zona = $PDO->query("SELECT distinct d.zona FROM destinazioni_t d order by 1 asc");
              $sql_zona->setFetchMode(PDO::FETCH_ASSOC);
              while($row_z = $sql_zona->fetch()){
                echo("<optgroup label=\"" . $row_z[zona] . "\"></optgroup>");
                $sql_destinazione = $PDO->query("SELECT distinct destinazione FROM destinazioni_t d where d.zona = \"" . $row_z[zona] . "\"");
                $sql_destinazione->setFetchMode(PDO::FETCH_ASSOC);
                while($row_d = $sql_destinazione->fetch()){
                  echo("<option value=\"" . $row_d[destinazione] . "\">-->" . $row_d[destinazione] . "</option>");
                  }
                }
         ?>
      </select>
      </td>
      </tr>
      <tr>
      <td align="left"><label><strong>Data Partenza</strong></label></td>
      <td>&nbsp;</td>
      <td align="left">
      <input value="" class="validate[required]" type="text" name="andata" id="from" /></td>
      </tr>
      <tr>
      <td align="left"><label><strong>Data Rientro</strong></label></td>
      <td>&nbsp;</td>
      <td align="left">
      <input value="" class="validate[required]" type="text" name="ritorno" id="to" /></td>
      </tr>
      <tr>
      <td align="left"><label><strong>Adulti</strong></label></td>
      <td>&nbsp;</td>
      <td align="left">
      <select class="validate[required]" name="adulti" id="adulti">
      <option value="">-</option>
      <option value="0">0</option>
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      <option value="6">6</option>
      <option value="7">7</option>
      <option value="8">8</option>
      <option value="9">9</option>
      <option value="10">10</option>
      </select>
      </td>
      </tr>
      <tr>
      <td align="left"><label><strong>Bambini (sotto 12 anni)</strong></label></td>
      <td>&nbsp;</td>
      <td align="left">
      <select class="validate[required]" name="bambini" id="bambini">
      <option value="">-</option>
      <option value="0">0</option>
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      <option value="6">6</option>
      <option value="7">7</option>
      <option value="8">8</option>
      <option value="9">9</option>
      <option value="10">10</option>
      </select>
      </td>
      </tr>
      <tr>
      <td align="left"><label><strong>Informazioni aggiuntive</strong></label></td>
      <td>&nbsp;</td>
      <td align="left"><textarea id="text_form" name="info" cols="38" rows="5"></textarea></td>
      </tr>
      <tr height="50px" valign="middle">
      <td colspan="3" align="center"><input type="submit" value="INVIA"></td>
      </tr>
      </table>

      </td>
      <td width="100px;">&nbsp;</td>
      </tr>
      </table>
  		</fieldset>
      </form>
      </p>
		</div>

		<div class="subnav">
      <center>
      <!--news-->
      <?php include("news.php"); ?>
      <!--banner-->
      <a href="http://www.latuagenziadiviaggi.it/documenti/cataloghi/2013-04_volantone_e_speciale_famiglia_2013/speciale_famiglie_estate_2013_bravonet.pdf"><img src="http://www.latuagenziadiviaggi.it/documenti/cataloghi/2013-04_volantone_e_speciale_famiglia_2013/banner_adv_speciale/volantone_speciale_famiglie_180x150.png" alt="Speciale Famiglie Estate 2013 Bravo-Net" title="Speciale Famiglie Estate 2013" /></a><br>
      <a href="http://www.viaggiaresicuri.it" title="INFORMAZIONI SUL VIAGGIO" target="_blank"><img src="images/viaggiare-sicuri.jpg" border="0" /></a><br>
      <a href="http://www.imaivisti.it/856-f-wonder-viaggi?utm_source=siti+adv&amp;utm_medium=banner&amp;utm_term=F%20%26%20WONDER%20VIAGGI+856&amp;utm_campaign=banner+logo+imaivisti"><img src="http://www.latuagenziadiviaggi.it/documenti/i_mai_visti/banner/180x150.png" width="180" height="150" alt="banner i mai visti" title="Le migliori offerte per le tue vacanze, a prezzi mai visti!" /></a> 
      </center>
		</div>
		<div class="clearer"><span> </span></div>

	</div>
</div>

<div class="bottom">
	<div class="footer">
		F &amp; WONDERVIAGGI<br>
    Tel. 366.2457526 Fax. 02.36527384 info@fwonderviaggi.it<br>
    &copy; 2012 <a href="index.html">www.fwonderviaggi.it</a>
	</div>
<center>
<!-- Inizio Codice ShinyStat -->
<script src="http://codice.shinystat.com/cgi-bin/getcod.cgi?USER=fwonderviaggi"></script>
<noscript>
<a href="http://www.shinystat.com/it" target="_top">
<img src="http://www.shinystat.com/cgi-bin/shinystat.cgi?USER=fwonderviaggi" alt="Utenti connessi" border="0" /></a>
</noscript>
<!-- Fine Codice ShinyStat -->
</center>
</div>
</body>
</html>